Device to device communication (D2D) refers to a communication mode in which user equipment (UE) directly communicate without using a base station. A D2D technology can play a function of reducing burden of a macro network and increasing a rate of communication between UEs.
To implement direct communication between the UEs, the UEs need to discover each other first. To introduce the D2D communication mode into a Long Term Evolution (Long Term Evolution, LTE for short) system, a discovery (Discovery) time period needs to be inserted into the LTE system according to a specific rule, and each UE transmits a discovery signal in the discovery time period, so as to be discovered by another UE. In order not to affect cellular communication of a current LTE system, a time interval between every two discovery time periods may be long, for example, from several hundred milliseconds to several seconds. In terms of time, each discovery time period is divided into several time units, each of which is represented by j∈J, and each time unit may be divided according to a same rule in a frequency division manner into several frequency-domain units, each of which is represented by i∈I. The ith frequency-domain unit in the jth time unit is referred to as the (i, j)th frequency-time unit. In each discovery time period, each UE involved in D2D communication may send a discovery signal in a frequency-time unit, to facilitate detection of another UE. Generally, in consideration of that a scenario in which UEs that transmit discovery signals at the same time cannot discover each other, frequency-time hopping needs to be performed on a pattern of each discovery time period, that is, a frequency-time location at which each UE transmits a discovery signal in each discovery time period is made different, so that each UE has a chance to be discovered by all other UEs, and the pattern of the discovery time period is a frequency-time pattern of the discovery time period.
However, in the LTE system, when an interval between two consecutive discovery time periods is long, UE cannot obtain a frequency-time pattern of a discovery time period.